﻿<Window x:Class="AttendanceAccounting.Windows.Settings"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:AttendanceAccounting.Windows"
        mc:Ignorable="d"
        Title="Настройки" Height="450" Width="360"
        WindowStartupLocation="CenterScreen"
        MinHeight="450" MinWidth="360"
        MaxHeight="450" MaxWidth="360"
        Closing="Window_Closing">
    <Grid>
        <StackPanel VerticalAlignment="Center"
    Margin="20 0">
            <Label Content="Адрес сервера:"
   FontSize="14"
   x:Name="textHost"/>
            <TextBox x:Name="host"
     Margin="5"
     FontSize="16"
     TextChanged="host_TextChanged">
                <TextBox.Resources>
                    <Style TargetType="Border">
                        <Setter Property="CornerRadius" Value="12"/>
                    </Style>
                </TextBox.Resources>
            </TextBox>

            <Label Content="Название БД:"
   FontSize="14"/>
            <TextBox x:Name="database"
     Margin="5"
     FontSize="16"
     TextChanged="database_TextChanged">
                <TextBox.Resources>
                    <Style TargetType="Border">
                        <Setter Property="CornerRadius" Value="12"/>
                    </Style>
                </TextBox.Resources>
            </TextBox>

            <Label Content="Логин:"
   FontSize="14"/>
            <TextBox x:Name="login"
     Margin="5"
     FontSize="16"
     TextChanged="login_TextChanged">
                <TextBox.Resources>
                    <Style TargetType="Border">
                        <Setter Property="CornerRadius" Value="12"/>
                    </Style>
                </TextBox.Resources>
            </TextBox>

            <Label Content="Пароль:"
   FontSize="14"/>
            <TextBox x:Name="password"
     Margin="5"
     FontSize="16"
     TextChanged="password_TextChanged">
                <TextBox.Resources>
                    <Style TargetType="Border">
                        <Setter Property="CornerRadius" Value="12"/>
                    </Style>
                </TextBox.Resources>
            </TextBox>

            <Button Content="Проверить подключение"
    Margin="5"
    Click="checkConnect"
    FontSize="14">
                <Button.Resources>
                    <Style TargetType="Border">
                        <Setter Property="CornerRadius" Value="12"/>
                    </Style>
                </Button.Resources>
            </Button>
                <Button Content="Сохранить настройки"
    Margin="5"
    Click="saveSettings"
    FontSize="14">
                <Button.Resources>
                    <Style TargetType="Border">
                        <Setter Property="CornerRadius" Value="12"/>
                    </Style>
                </Button.Resources>
            </Button>
        </StackPanel>
        
    </Grid>
</Window>
